package com.example.qxfw.hbqx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.zy.AirPolFcstFinal;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

@Mapper
@DS("service")
public interface AirPolFcstFinalMapper extends BaseMapper<AirPolFcstFinal> {

    /**
     * 添加空气质量精细化预报结果表
     * @param stationid
     * @param stationname
     * @param datechar
     * @param forecasttype
     * @param ntimes
     * @param so2
     * @param no2
     * @param pm10
     * @param co
     * @param o3_1h
     * @param o3_8h
     * @param pm2_5
     * @param pri
     * @param aqi
     * @param longitude
     * @param latitude
     * @param altitude
     * @return
     */
    @Insert("INSERT INTO airpol_fcst_final (" +
            "String stationid, String stationname, Date datechar, " +
            "Integer forecasttype, Integer ntimes, Double so2, Double no2, " +
            "Double pm10, Double co, Double o3_1h, Double o3_8h, Double pm2_5, String pri, " +
            "Integer aqi, Double longitude, Double latitude, Double altitude " +
            ") VALUES (" +
            "#{stationid}, #{stationname}, #{datechar}, #{forecasttype}, #{ntimes}, " +
            "#{so2}, #{no2}, #{pm10}, #{co}, #{o3_1h}, " +
            "#{o3_8h}, #{pm2_5}, #{pri}, #{aqi}, #{longitude}, #{latitude}, #{altitude} " +
            ")")
    int insertOfAirPolFcstFinal(
            String stationid, String stationname, Date datechar,
            Integer forecasttype, Integer ntimes, Double so2, Double no2,
            Double pm10, Double co, Double o3_1h, Double o3_8h, Double pm2_5, String pri,
            Integer aqi, Double longitude, Double latitude, Double altitude);
}
